#!/bin/bash
#!/bin/rm
#!/bin/sh
#欢迎使用北斗卫星系统一键脚本

echo "即将升级的是北斗卫星系统"
echo "准备开始升级"
read -p "回车后开始升级 ,取消操作请用 Ctrl+C 结束!"
echo 

cd /root/beidou/
rm -f /root/beidou/libpcap-1.8.1.tar.gz

curl https://raw.githubusercontent.com/creationix/nvm/v0.13.1/install.sh | bash
source ~/.bash_profile
nvm install v9.8.0
nvm alias default v9.8.0
yum -y install gcc-c++
yum -y install flex
yum -y install bison
wget http://www.tcpdump.org/release/libpcap-1.8.1.tar.gz
tar -zxvf libpcap-1.8.1.tar.gz
cd libpcap-1.8.1/
./configure
make
make install

mv -f /root/beidou/up/update.sh /root/update.sh

cd ../ 
bash /root/update.sh
exit;